package com.goods.business.controller;

import com.goods.business.service.ProductService;
import com.goods.common.vo.business.ProductVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {
    @Autowired
    ProductService productService;

    public List<ProductVO> findProductList(Integer pageNum, Integer pageSize, String name, Integer categoryId, Integer status) {
    return productService.findProductList(pageNum,pageSize,name,categoryId,status);
    }


    public void productAdd(ProductVO productVO) {
        productService.productAdd(productVO);
    }

    public void updateProductById(Integer id, ProductVO productVO) {
        productService.updateProductById(id,productVO);
    }
}
